#include<stdio.h>
#include<assert.h>
void* my_memmove(void* dest, const void* src, size_t count)
{
    assert(dest && src);
    char* start = (char*)dest;
    
        if (dest < src)
        {
            while (count--)
            {
                *(char*)dest = *(char*)src;
                dest = (char*)dest + 1;
                src = (char*)src + 1;
            }
        }
        else
        {
            while (count--)
            {
                *( (char*)dest + count) =* ( (char*)src + count);
            }
        }
        return start;
    
}
int main()
{
    int arr1[] = { 1,2,3,4,5,6,7,8,9,10 };
    my_memmove((int*)arr1+5,(int*)arr1+3, 20);
    for (int i = 0; i < 10; i++)
    {
        printf("%d\n",arr1[i]);
    }
    return 0;
}



